package o;

import android.animation.AnimatorInflater;
import android.animation.ObjectAnimator;
import android.animation.StateListAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewOutlineProvider;
import androidx.annotation.RequiresApi;
import o.aqu.d;
import o.aqu.g;

@RequiresApi(21)
public class arf {
    private static final int[] ˋ = new int[]{16843848};

    arf() {
    }

    public static void ॱ(View view) {
        view.setOutlineProvider(ViewOutlineProvider.BOUNDS);
    }

    public static void ॱ(View view, AttributeSet attributeSet, int i, int i2) {
        Context context = view.getContext();
        TypedArray ॱ = asa.ॱ(context, attributeSet, ˋ, i, i2, new int[0]);
        try {
            if (ॱ.hasValue(0)) {
                view.setStateListAnimator(AnimatorInflater.loadStateListAnimator(context, ॱ.getResourceId(0, 0)));
            }
            ॱ.recycle();
        } catch (Throwable th) {
            ॱ.recycle();
        }
    }

    public static void ˎ(View view, float f) {
        int integer = view.getResources().getInteger(g.ˋ);
        StateListAnimator stateListAnimator = new StateListAnimator();
        stateListAnimator.addState(new int[]{16842766, d.ॱˎ, -d.ᐝॱ}, ObjectAnimator.ofFloat(view, "elevation", new float[]{0.0f}).setDuration((long) integer));
        stateListAnimator.addState(new int[]{16842766}, ObjectAnimator.ofFloat(view, "elevation", new float[]{f}).setDuration((long) integer));
        stateListAnimator.addState(new int[0], ObjectAnimator.ofFloat(view, "elevation", new float[]{0.0f}).setDuration(0));
        view.setStateListAnimator(stateListAnimator);
    }
}
